package com.tongji.diy.controller.furnitureOptimizationController
{
	import com.tongji.diy.event.furnitureOptimizationEvent.FurnitureOptimizationClickEvent;
	import com.tongji.diy.model.furniturePlacementOptimization.FurnitureOptimizationModel;
	
	import org.robotlegs.mvcs.Command;
	
	public class FurnitureOptimizationClickCommand extends Command
	{
		[Inject]
		public var event:FurnitureOptimizationClickEvent;
		
		[Inject]
		public var model:FurnitureOptimizationModel;
		
		public function FurnitureOptimizationClickCommand()
		{
			super();
		}
		
		override public function execute():void
		{
			switch(event.type)
			{
				case FurnitureOptimizationClickEvent.FURNITURE_OPTIMIZATION:
					model.startOptimization();
					break;
				case FurnitureOptimizationClickEvent.FURNITURE_OPTIMIZATION_FRAGMENT_SHOW:
					model.fragmentsShowAnnealingProcess();
					break;
			}
		}
	}
}